﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;

namespace WebApplication.Core.Helpers
{
    public class DeployHelper
    {
        public static string GetNotConfiguredDeployCommand(string commandFilePath)
        {
            return File.ReadAllText(commandFilePath);
        }

        public static string GetConfiguredDeployCommand(string commandFilePath, string setParametersFile, string remoteServer, string user, string password, string packagePath)
        {
            string file = GetNotConfiguredDeployCommand(commandFilePath);
            string cmd = file.Replace("{$setParametersFile}", setParametersFile)
                .Replace("{$remoteServer}", remoteServer)
                .Replace("{$user}", user)
                .Replace("{$password}", password)
                .Replace("{$packagePath}", packagePath);
            return cmd;
        }
    }
}